import request from '@/utils/request'

export function login(username,password){
	return request({
		url: '/user/login',
		method: 'post',
		data: {
			username: username,
			password: password
		}
	})
}

export function logout(){
	return request({
		url: '/user/logout',
		method: 'post'
	})
}

export function register(data){
	return request({
		url: '/user/register',
		method: 'post',
		data
	})
}
export function update(data){
	return request({
		url: '/user/update',
		method: 'post',
		data
	})
}
export function del(data){
	return request({
		url: '/user/del',
		method: 'post',
		data
	})
}
export function list(){
	return request({
		url: '/user/list',
		method: 'post'
	})
}
export function search(data){
	return request({
		url: '/user/search',
		method: 'post',
		data
	})
}